package org.michael.u.brg.by.spring.aop.abcthreads;

import java.util.concurrent.atomic.AtomicLong;

/**
 * Provides unique per a JVM run long IDs to distinguish the beans from each other.
 */
public class IdProvider {

	private AtomicLong id;
	
	public void init() {
		System.out.printf("%nID provider initialized");
		id = new AtomicLong(0);
	}
	
	public Long getNext() {
		return id.incrementAndGet();
	}
}
